import yagmail
import HTMLTestRunner_cn
import logging


class public():
    def log1(self):
        log = logging.basicConfig(filename='aa.log',
                            filemode='a+',
                            level=logging.DEBUG,
                            format='%(levelname)s %(filename)s %(asctime)s %(message)s %(lineno)d')
        return log
    def report(self):
        report = HTMLTestRunner_cn.HTMLTestRunner(open('aa.html','wb'),
                                                  title='项目员工',
                                                  description='vbghynjuk,ilkmhjnbgfvd')
        return report
    def email(self):
        emal = yagmail.SMTP(user='2829138788@qq.com',password='ktsrrzrhxlycdfca',host='smtp.qq.com')
        emal.send(to='2829138788@qq.com',subject='测试报告+日志',contents=['aaa','aa.log','aa.html'])
        emal.close()





